const path = require('path');

console.log(path.resolve(__dirname, 'src/index.js'));

module.exports = {
    // mode: process.env.NODE_ENV === 'development' ? 'development' : 'production',
    mode: 'development',
    entry: path.resolve(__dirname, 'src/index.js'),
    output: {
        filename: 'bundle.js',
        path: path.resolve(__dirname, 'dist')
    },
    devServer: {
        port: 8181,//控制端口
        open: false //是否自动打开默认浏览器
    }
};
